<?php
namespace app\api\controller;

use app\common\controller\Common;

class Aws extends Common{
    public function serverInfo()
    {
        $result = file_get_contents(config('aws.server_info_url'));
        return $result;    
    }

    public function userInfo()
    {
        $result = file_get_contents(config('aws.user_info_url'));
        return $result;    
    }

    public function messages($limit = 100, $page = 1)
    {
        $list = Model('Realtime')->limit($limit)->page($page)->order('id desc')->select();
        $count = Model('Realtime')->count();
        return resultArray(['data' => ['list' => $list ,'count' => $count]]);
    }
}